import 'package:flutter/material.dart';
import 'package:get/get.dart';

class Login extends StatefulWidget {
  Login({Key? key}) : super(key: key);

  @override
  State<Login> createState() => _LoginState();
}

class _LoginState extends State<Login> {
  late final String id;

  @override
  void initState() {
    super.initState();
    // 获取路由参数
    id = Get.parameters['id'].toString();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Text('登录页面'),
            Text('我接受到上个页面的参数 id: $id'),
          ],
        ),
      ),
    );
  }
}
